// for循环实现累加，超过5000结束
#include <stdio.h>
int main(int argc, char const *argv[])
{
    int number;
    int sum = 0;
    int times;
    for (times = 0; sum < 5000; times++)
    {
        printf("请输入一个整数：");
        scanf("%d", &number);
        sum = sum + number;
    }
    printf("times=%d, sum=%d", times, sum);
    return 0;
}
